using System;
using System.Reflection;
using SwinGame;
using Color = System.Drawing.Color;

namespace Gundam_2._0_Alpha.src
{
    public class GameMain
    {
        public static void Main()
        {
            Resources.SetAppPath(Assembly.GetExecutingAssembly().Location, true);
            Audio.OpenAudio();
            Core.OpenGraphicsWindow("Gundam II - The Chosen Future", GlobalConst.ScreenWidth, GlobalConst.ScreenHeight);
            Graphics.ClearScreen();

            GameController gc = new GameController();
            Timer timer = Core.CreateTimer();
            int timeToUpdate = 0, timeToDraw = 0;
            Core.StartTimer(timer);

            while (!Core.WindowCloseRequested())
            {
                Core.ProcessEvents();
                
                gc.Draw();
                gc.Update();
                Core.RefreshScreen(60);
            }

            Audio.CloseAudio();
            Resources.ReleaseAllResources();
        }
    }
}
